package com.qpkj.oms.service.impl;

import java.util.List;
import com.qpkj.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qpkj.oms.mapper.OmsTaskStepMapper;
import com.qpkj.oms.domain.OmsTaskStep;
import com.qpkj.oms.service.IOmsTaskStepService;

/**
 * 任务步骤Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-20
 */
@Service
public class OmsTaskStepServiceImpl implements IOmsTaskStepService 
{
    @Autowired
    private OmsTaskStepMapper omsTaskStepMapper;

    /**
     * 查询任务步骤
     * 
     * @param stepId 任务步骤主键
     * @return 任务步骤
     */
    @Override
    public OmsTaskStep selectOmsTaskStepByStepId(Long stepId)
    {
        return omsTaskStepMapper.selectOmsTaskStepByStepId(stepId);
    }

    /**
     * 查询任务步骤列表
     * 
     * @param omsTaskStep 任务步骤
     * @return 任务步骤
     */
    @Override
    public List<OmsTaskStep> selectOmsTaskStepList(OmsTaskStep omsTaskStep)
    {
        return omsTaskStepMapper.selectOmsTaskStepList(omsTaskStep);
    }

    /**
     * 新增任务步骤
     * 
     * @param omsTaskStep 任务步骤
     * @return 结果
     */
    @Override
    public int insertOmsTaskStep(OmsTaskStep omsTaskStep)
    {
        omsTaskStep.setCreateTime(DateUtils.getNowDate());
        return omsTaskStepMapper.insertOmsTaskStep(omsTaskStep);
    }

    /**
     * 修改任务步骤
     * 
     * @param omsTaskStep 任务步骤
     * @return 结果
     */
    @Override
    public int updateOmsTaskStep(OmsTaskStep omsTaskStep)
    {
        omsTaskStep.setUpdateTime(DateUtils.getNowDate());
        return omsTaskStepMapper.updateOmsTaskStep(omsTaskStep);
    }

    /**
     * 批量删除任务步骤
     * 
     * @param stepIds 需要删除的任务步骤主键
     * @return 结果
     */
    @Override
    public int deleteOmsTaskStepByStepIds(Long[] stepIds)
    {
        return omsTaskStepMapper.deleteOmsTaskStepByStepIds(stepIds);
    }

    /**
     * 删除任务步骤信息
     * 
     * @param stepId 任务步骤主键
     * @return 结果
     */
    @Override
    public int deleteOmsTaskStepByStepId(Long stepId)
    {
        return omsTaskStepMapper.deleteOmsTaskStepByStepId(stepId);
    }
}
